Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stale state inside action creators on hot reload #92

Merged
merged 4 commits into from
Jun 14, 2015

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Jun 14, 2015

This fixes #90 and includes a failing (now fixed!) test from #91 (thanks @aaronjensen!)

The issue was due to the inner function overwriting the middlewares parameter of the outer function during its first invocation, so getState was injected only once.

gaearon added a commit that referenced this pull request Jun 14, 2015
Fix stale state inside action creators on hot reload
@gaearon gaearon merged commit e70b24d into master Jun 14, 2015
@gaearon gaearon deleted the fix-stale-getState branch June 14, 2015 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getState() in actionCreators returns initial state, not current state after a reload
2 participants